home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19971216-19980424 / 000270_news@newsmaster….columbia.edu _Fri Feb 27 09:54:52 1998.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id JAA16290
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 27 Feb 1998 09:54:47 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id JAA02734
  7.     for kermit.misc@watsun; Fri, 27 Feb 1998 09:54:46 -0500 (EST)
  8. Path: news.columbia.edu!panix!nntprelay.mathworks.com!news.maxwell.syr.edu!bignews.mediaways.net!newsfeed.metronet.de!newsfeed2.ecrc.net!news.siemens.de!news.mch.sni.de!michel
  9. From: Michel.Dalle@sni.be (Michel Dalle)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Catching errors while executing 'run console-app' commands in K95 ?
  12. Date: Fri, 27 Feb 1998 16:51:46 GMT
  13. Organization: Siemens Nixdorf
  14. Lines: 32
  15. Message-ID: <6d6jic$q5a$1@horus.mch.sni.de>
  16. NNTP-Posting-Host: michel.ch.sni.be
  17. X-Newsreader: News Xpress 2.01
  18. Xref: news.columbia.edu comp.protocols.kermit.misc:8462
  19.  
  20. Hello,
  21.  
  22. I'm still trying to catch all kinds of errors while I'm executing scripts with 
  23. K95. What has me stumped now is the following :
  24.  
  25. In a Kermit script, I want to launch a "console application" (something that 
  26. runs in the DOS box of Windows 95 and NT). The console application returns a 
  27. status of 0 if everything is OK, and it sends some messages to STDOUT. If the 
  28. console application failes, it returns a status of 1, 2, 3, ... and prints a 
  29. corresponding message to STDERR (this can be modified if needed).
  30.  
  31. How can I :
  32.  
  33. 1) know whether Kermit could launch the console application at all (e.g. no 
  34. "Bad command or file name" message)
  35. 2) know whether the console application executed correctly or not.
  36. 3) if there is an error, catch the error messages from stderr to some variable 
  37. in the script.
  38. 4) if there is no error, catch the stdout messages to some variable in the 
  39. script.
  40.  
  41. >From what I've seen in tests, \v(status) and \v(exitstatus) always return 0, 
  42. and \v(pexitstat) always returns 1, independently of the success or failure of 
  43. the console application (at least on Windows 95... ).
  44. Is there another way to catch these errors ?
  45.  
  46. Thanks for your help,
  47.  
  48. Michel.
  49.  
  50. P.S.: oh yes, I'm running K95 1.1.15 on Windows 95, and the console 
  51. application was made with Visual C++ 4.2.